package delete3;

import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

//客户端
public class UDP11 {
    public static void main(String[] args) throws Exception {
        DatagramSocket socket=new DatagramSocket(6969);

        String msg="我想打篮球!!!";

        DatagramPacket packet=new DatagramPacket(msg.getBytes(),0,msg.getBytes().length,
                InetAddress.getByName("localhost"),7878);

        socket.send(packet);

        socket.close();





    }
}
